package com.xiaokaceng.openci.dto;

import java.io.Serializable;

import com.xiaokaceng.openci.domain.ToolConfiguration;

public class ToolConfigurationDto implements Serializable {

	private static final long serialVersionUID = 8517223581065995794L;

	private Long id;

	private String name;

	private String toolType;

	private String requestUrl;

	public ToolConfigurationDto(Long id) {
		this.id = id;
	}
	
	public ToolConfigurationDto() {
		
	}
	
	public static ToolConfigurationDto transformBy(ToolConfiguration toolConfiguration) {
		ToolConfigurationDto toolConfigurationDto = new ToolConfigurationDto();
		toolConfigurationDto.setId(toolConfiguration.getId());
		toolConfigurationDto.setName(toolConfiguration.getName());
		toolConfigurationDto.setToolType(toolConfiguration.getToolType().toString());
		return toolConfigurationDto;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getToolType() {
		return toolType;
	}

	public void setToolType(String toolType) {
		this.toolType = toolType;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRequestUrl() {
		return requestUrl;
	}

	public void setRequestUrl(String requestUrl) {
		this.requestUrl = requestUrl;
	}

}
